<!doctype html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:include="include :: header"></head>
<body>
<div style="padding: 15px">
    <form class="layui-form" action="">
        <input id="treeId" name="treeId" type="hidden" th:value="${menu.menuId}"/>
        <input id="treeName" name="treeName" type="hidden" th:value="${menu.menuName}"/>
        <div style="text-align: center">
            <a class="layui-btn layui-btn-xs" href="javascript:;" onclick="$.tree.expand()">展开</a>
            <a class="layui-btn layui-btn-xs" href="javascript:;" onclick="$.tree.collapse()">折叠</a>
            <div id="menuTrees" class="ztree treeselect"></div>
        </div>
    </form>
</div>
<div th:include="include :: footer"></div>
<script type="text/javascript" th:src="@{/jquery-ztree/js/jquery.ztree.all-3.5.js}"></script>
<script>
    var sysUrl = '/venus/system/menu';
    //树形菜单
    var options = {
        id: "menuTrees",
        url: sysUrl + '/menuTreeData',
        onClick: zOnClick,
        check: {enable: false, nocheckInherit: true, chkboxType: {"Y": "ps", "N": "ps"}},
        expandLevel: 0
    };
    $.tree.init(options);
</script>
</body>
</html>